#pragma once 

#include <stdio.h>

#define NUM 1024
#define BUFF_NONE 0x1
#define BUFF_LINE 0x2
#define BUFF_ALL 0x4

typedef struct LJK_FILE{
  int fd;
  char outputbuffer[NUM];
  int flags; // flush method
  int current;
} LJK_FILE;

LJK_FILE *my_fopen(const char *path, const char *mode);
size_t my_fwrite(const void *ptr, size_t size, size_t nmemb, LJK_FILE *stream);
int my_fclose(LJK_FILE *fp);
int my_fflush(LJK_FILE* fp);

